package com.tanguy.user.utlis.extend

import android.content.Context
import android.support.v4.app.Fragment
import android.view.View

/**
 * Created by zhangyujiu on 2017/8/4.
 */
fun Context.gone(vararg views: View) {
    if (views.isNotEmpty()) {
        views.forEach {
            it.visibility = View.GONE
        }
    }
}

fun Fragment.gone(vararg views: View) {
    if (views.isNotEmpty()) {
        views.forEach {
            it.visibility = View.GONE
        }
    }
}

fun View.gone(vararg views: View) {
    if (views.isNotEmpty()) {
        views.forEach {
            it.visibility = View.GONE
        }
    }
}


fun Context.visible(vararg views: View) {
    if (views.isNotEmpty()) {
        views.forEach {
            it.visibility = View.VISIBLE
        }
    }
}

fun Fragment.visible(vararg views: View) {
    if (views.isNotEmpty()) {
        views.forEach {
            it.visibility = View.VISIBLE
        }
    }
}

fun View.visible(vararg views: View) {
    if (views.isNotEmpty()) {
        views.forEach {
            it.visibility = View.VISIBLE
        }
    }
}
